import request from '@/utils/request'

// 查询合同管理列表
export function listAgreement(query) {
  return request({
    url: '/eoms/agreement/list',
    method: 'get',
    params: query
  })
}

// 查询合同管理详细
export function getAgreement(agreementId) {
  return request({
    url: '/eoms/agreement/' + agreementId,
    method: 'get'
  })
}

// 新增合同管理
export function addAgreement(data) {
  return request({
    url: '/eoms/agreement',
    method: 'post',
    data: data
  })
}

// 修改合同管理
export function updateAgreement(data) {
  return request({
    url: '/eoms/agreement',
    method: 'put',
    data: data
  })
}

// 删除合同管理
export function delAgreement(agreementId) {
  return request({
    url: '/eoms/agreement/' + agreementId,
    method: 'delete'
  })
}

// 导出合同管理
export function exportAgreement(query) {
  return request({
    url: '/eoms/agreement/export',
    method: 'get',
    params: query
  })
}